package Reproductor;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Pablo
 */
public class CorregirRuta {
    
    public static String getRutaCorregida(String ruta){
        String rutaCorregida="";
        int dim = ruta.length();
        char[] caracteres = ruta.toCharArray();
        for(int i=0;i<ruta.length();i++) {
            if(caracteres[i]=='\\'){
                rutaCorregida+="\\\\";
            }
            else {
                rutaCorregida+=caracteres[i];
            }
        }
        return rutaCorregida;
    }
    
    /*public static void main (String[] args) {
        String filename = "C:/MUSICA/Holyday - Green Day.mp3";
        String ruta = CorregirRuta.getRutaCorregida(filename);
        System.out.println("FILENAME:"+filename);
        System.out.println("RUTA:"+ruta);
    }*/
}
